import java.io.*;
import flex.messaging.io.SerializationContext;
import flex.messaging.io.amf.Amf3Input;

public class AMF3InputStream extends DataInputStream {
	SerializationContext serializationContext = new SerializationContext();
	Amf3Input amfinput = new Amf3Input(serializationContext);
	
	public AMF3InputStream(InputStream input)
	{
		super(input);
		amfinput.setInputStream(this);
	}
	
	public Object readAMF3Object() throws IOException, ClassNotFoundException
	{
		Object obj = null;
		obj = amfinput.readObject();
		return obj;
	}
}
